home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PC World 2006 September
/
PCWorld_2006-09_cd.bin
/
v cisle
/
hexer
/
mpth_17.exe
/
{app}
/
scripts
/
Concat Files.mps
< prev
next >
Wrap
Text File
|
2005-05-22
|
923b
|
46 lines
include '*.lng'
= concat files (file.01, ...02,...)
var fname text, path text, filer text, datt text curline dword
var lenlf dword, pos dword, file1 file, ed file, dat file lines dword
fname = askopenfilename(__AOC__, __AOF__):= get data file
path = extractpath(fname)
file1 = fileopen(fname)
fileread file1 fname
datt = fname
fileclose file1
lines = 0
lenlf = textlen("\n")
@@L0
pos = textpos("\n", datt)
inc lines 1
datt = textcopy(datt, pos+lenlf)
if (datt != '')
goto L0
endif
curline = 0
ed = fileopen('::new', 'c')
@@L
pos = textpos("\n", fname)
filer = path+textcopy(fname, 1, pos-1)
fname = textcopy(fname, pos+lenlf)
if not fileexists(filer)
error __ERRF1__,filer,__ERRF2__
endif
dat = fileopen(filer)
fileread dat datt filesize(dat)
fileclose dat
filewrite ed datt
showprogress lines, curline
inc curline 1
if fname != ''
goto L
endif
showprogress 100